package com.lp.mgt.mappers;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lp.mgt.entities.Menu;
import com.lp.mgt.entities.User;

@Mapper
public interface MenuMapper {
	List<Menu> getAllMenusWithAdmin();
	List<Menu> getMenusByUserId(String uid);
	List<Menu> getAllMenus(Menu menu);
	//根据角色id查关联的菜单
	List<Menu> getMenusByRoleId(String roleId);
	int removeMenusByRoleId(String roleId);
	int saveBatchMenusWithRoleId(HashMap<String, Object> map);
	List<Menu> getLastoneMenu(@Param("moveFlag") String mf,@Param("parentId") String parentId,@Param("orderNum") String valueOf);
	int updateMenusByBatch(List<Menu> last);
	//递归查子节点
	List<String> getChildMenuByParentID(String fjid);
	void removeBatchMenusByIds(List<String> idlist);//批量删除
	List<Menu> getBrotherMenusByMenuId(String menuId);
	int saveMenu(Menu menu);
	int editMenu(Menu menu);
	List<Menu> getBrotherMenusByParentId(String menuId);
	Menu getMenuById(String nodeID);
	void removeBatchRoleAndMenus(List<String> idlist);
}
